Current Location: Home> Function Categories> log1p

log1p

Returns log(1 + number), and can calculate the exact result even when the value of number is close to zero.
Name:log1p
Category:math
Programming Language:php
One-line Description:Returns log(1+number).

Definition and usage

log1p() returns log(1+ number ) , and the accurate result can be calculated even when the value of number is close to zero.

Example

Returns the log(1+ number ) of different values. Calculation result:

 <?php
echo ( log1p ( 2.7183 ) ) ;
echo ( log1p ( 2 ) ) ;
echo ( log1p ( 1 ) ) ;
echo ( log1p ( 0 ) ) ;
?>

Try it yourself

grammar

 log1p ( x )
parameter describe
x Required. A number.

illustrate

Warning: This function is experimental. The behavior of this function, including function name and any other documentation about this function, may change with subsequent releases by PHP without notification. Use of this function at your own risk.

Similar Functions
  • Convert decimal to hexadecimal dechex

    dechex

    Convertdecimaltohexa
  • Convert radians to corresponding angles rad2deg

    rad2deg

    Convertradianstocorr
  • Returns the remainder of the floating point number of division fmod

    fmod

    Returnstheremaindero
  • Hyperbolic cosine cosh

    cosh

    Hyperboliccosine
  • Logarithm with base 10 log10

    log10

    Logarithmwithbase10
  • Exponential expressions pow

    pow

    Exponentialexpressio
  • Leave the method of sorting floor

    floor

    Leavethemethodofsort
  • Convert numbers between any binary base_convert

    base_convert

    Convertnumbersbetwee
Popular Articles